{% extends "index.html" %}
{% block result %}
    <form action="{{ url_for('base.borrow_book') }}" class='d_form' method="POST">
        <h3>图书借阅</h3>
        <label>
            <input type='text' name='book_id' value placeholder='请输入图书ID'>
        </label>
        {% if user %}
            {% if user.name=="admin" %}
                <label>
                    <input type='text' name='borrower_name' value placeholder='请输入学生的借书证号（用户名）'>
                </label>
            {% endif %}
        {% endif %}


        {% for message in get_flashed_messages() %}
            <div class="form-group">
                <div class="text-danger">{{ message }}</div>
            </div>
        {% endfor %}
        <input id='submit' type='submit' name='submit' value='借阅'>

    </form>

{% endblock %}